package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * sku信息
 */
@TableName(value ="sku")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Sku implements Serializable {
    /**
     * skuId
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * spuId
     */
    private Long spuId;

    /**
     * sku名称
     */
    private String name;

    /**
     * 所属分类id
     */
    private Long categoryId;


    /**
     * 默认图片
     */
    private String defaultImage;

    /**
     * 标题
     */
    private String title;

    /**
     * 副标题
     */
    private String subtitle;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 重量（克）
     */
    private Integer weight;

    /**
     * 商品库存
     */
    @TableField(value = "stock")
    private Long stock;

    /**
     * 已卖出商品数量
     */
    @TableField(value = "sell")
    private Long sell;


    @TableField(value = "store_id")
    private Long storeId;

    @TableField(value = "store_name")
    private String storeName;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}